package
{
	import flash.display.*;
	import flash.events.Event;
	import flash.net.URLRequest;
	
	public class Img extends Sprite
	{
		private var loader:Loader;
		
		public function Img(axis:String, index:int)
		{
			loader = new Loader();
			
			var urlRequest:URLRequest = new URLRequest(
				"../img/" + axis + "_" + index.toString() + ".jpg");
			
			//var urlRequest:URLRequest = new URLRequest(
			//	"../img/" + axis + "_1.jpg");
			
			loader.contentLoaderInfo.addEventListener(
				Event.INIT, initListener);
			
			loader.load(urlRequest);
			
		}
		
		private function initListener(e:Event):void {
			loader.content.x = 0;
			loader.content.y = 0;
			
			loader.content.scaleX = 0.15;
			loader.content.scaleY = 0.15;
			
			this.addChild(loader.content);
		}
	}
}